import axiosData from '@/api/axios';

export default {
  queryPageByCondition(params) {
    return axiosData.post('/v3/40089-process-v2/task/queryPageByCondition', params);
  },
  add(params) {
    return axiosData.post('/v3/40089-process-v2/task/add', params);
  },
  getTaskName(batchName) {
    return axiosData.get(`/v3/40089-process-v2/task/getTaskName?batchName=${batchName}`);
  },
  delListByIdList(params) {
    return axiosData.post('/v3/40089-process-v2/task/delListByIdList', params);
  },
  edit(params) {
    return axiosData.post('/v3/40089-process-v2/task/edit', params);
  },
  startTask(taskId) {
    return axiosData.get(`/v3/40089-process-v2/task/startTask?taskId=${taskId}`);
  },
  pickingTask(taskId) {
    return axiosData.get(`/v3/40089-process-v2/task/pickingTask?taskId=${taskId}`);
  },
  startJobTask(taskId) {
    return axiosData.get(`/v3/40089-process-v2/task/startJobTask?taskId=${taskId}`);
  },
  reportTask(params) {
    return axiosData.post(`/v3/40089-process-v2/task/reportTask`, params);
  },
  completeTask(params) {
    return axiosData.post(`/v3/40089-process-v2/task/completeTask`, params);
  },
  suspendTask(params) {
    return axiosData.post(`/v3/40089-process-v2/task/suspendTask`, params);
  },
  getTaskProgressPage(params) {
    return axiosData.post(`/v3/40089-process-v2/taskProgress/queryPageByCondition`, params);
  },
  getTaskProgress(params) {
    return axiosData.post(`/v3/40089-process-v2/taskProgress/queryByCondition`, params);
  },
  repairPickingTask(params) {
    return axiosData.post(`/v3/40089-process-v2/task/repairPickingTask`, params);
  },
  productionInventory(params) {
    return axiosData.post(`/v3/40089-process-v2/productionInventory/queryPageByCondition`, params);
  },
  batchAdd(params) {
    return axiosData.post(`/v3/40089-process-v2/task/batchAdd`, params);
  },
  generateReceipt(taskId) {
    return axiosData.get(`/v3/40089-process-v2/task/generateReceipt?taskId=${taskId}`);
  },
  getTaskList(params) {
    return axiosData.post(`/v3/40089-process-v2/task/queryByCondition`, params);
  }
};
